import Vue from 'vue'
import VueRouter from 'vue-router'

//路由懒加载技术  引入组件的方式  可以大大减少体积
// const Foo = () => import(/* webpackChunkName: "group-foo" */ './Foo.vue')
const Home = () =>
    import ( /* webpackChunkName: "Home" */ '../components/Home.vue');



Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    //这里如果需要二级路由 就children
}]

const router = new VueRouter({
    routes
})

export default router